<template>
  <div class="nav">
    <div class="container nav-content">
      <p>
        <img
          @click="sx"
          src="https://flowbite.com/docs/images/logo.svg"
          alt=""
        /><span>马大哈d</span>
      </p>
      <p>
        <!-- <span>首页</span>
        <span>分类</span>
        <span>标签</span>
        <span>归档</span> -->
        <router-link to="/home" tag="span">首页</router-link>
        <router-link to="/cate" tag="span">分类</router-link>
        <router-link to="/tag" tag="span">标签</router-link>
        <router-link to="/acr" tag="span">归档</router-link>
      </p>
      <p>
        <span
          ><input type="text" name="" id="" placeholder="搜索待开发..." />
          <div></div>
        </span>
        <span>登录</span>
        <img
          style="
            width: 1.875rem;
            height: 1.875rem;
            margin-left: 1.25rem;
            border-radius: 50%;
          "
          src="	http://47.104.167.34:9000/byesame2023/a7f7995e78c64075b69af453d65d31da.jpg"
          alt=""
        />
      </p>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    sx() {
      window.location.reload();
    },
  },
};
</script>

<style scoped>
.nav {
  width: 100%;
  height: 70px;
  --tw-bg-opacity: 1;
  background-color: rgb(255 255 255 / var(--tw-bg-opacity));
  display: flex;
  justify-content: center;
  align-items: center;
}
.nav-content {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto;
}
.nav-content > p {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.nav-content p:nth-child(1) img {
  width: 30px;
  height: 30px;
  margin-right: 12px;
}
.nav-content p:nth-child(1) span {
  font-size: 24px;
  font-weight: 600;
}
.nav-content p:nth-child(2) {
  width: 240px;
  display: flex;
  justify-content: space-around;
}
.nav p:nth-child(3) {
  position: relative;
}
.nav-content p:nth-child(3) input {
  width: 208px;
  height: 37px;
  padding: 8px 8px 8px 40px;
  border-radius: 5px;
  border: 1px solid rgb(224, 213, 213);
  margin-right: 15px;
  outline-color: rgb(145, 199, 215);
}
.nav-content p:nth-child(3) div {
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translate(0, -50%);
  width: 20px;
  height: 20px;
  background-image: url("../assets/搜索.png");
  background-size: cover;
}
@media (max-width: 48rem) {
  .nav-content p:nth-child(2),
  .nav-content p:nth-child(3) span {
    display: none;
  }
}
</style>